Skip to content

Conversation

@ramprasadagarwal
Copy link
Collaborator

What changes were proposed in this pull request?

  • When the session times out the next url was not encoded by default. Where as when the login is success the backend decodes the next param by default which leads to inconsistency.
  • This PR fixes this bug by encoding the browser URL before passing it to the login next param.

How was this patch tested?

  • Manually tested

Please review Hue Contributing Guide before opening a pull request.

@github-actions
Copy link

github-actions bot commented Oct 27, 2025

✅ Test files were modified. Ensure that the tests cover all relevant changes. ✅

@github-actions
Copy link

github-actions bot commented Oct 27, 2025

UI Code Coverage Report

Lines Statements Branches Functions
Coverage: 33%
39.89% (31312/78478) 31.57% (14614/46286) 25.9% (2357/9097)

@github-actions
Copy link

github-actions bot commented Oct 27, 2025

Comment on lines +24 to +25
var browserUrl = window.location.pathname + window.location.search + window.location.hash;
window.location.href = '${login_url}?${redirect_field_name}=' + encodeURIComponent(browserUrl);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ranade1 What do you think, is it possible somehow to achieve this in middleware.py‎ so that we still can rely on standard browser redirects instead of JS redirect?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants